//
//  UIBarButtonItem+ZqlExtension.m
//  ZqlChangDian
//
//  Created by 赵乾龙 on 16/5/5.
//  Copyright © 2016年 Mr.zhao. All rights reserved.
//

#import "UIBarButtonItem+ZqlExtension.h"

@implementation UIBarButtonItem (ZqlExtension)

+ (instancetype)itemWithImageName:(NSString *)imageName target:(id)target action:(SEL)action{
    UIButton *btn = [[UIButton alloc]init];
    [btn setImage:[UIImage imageNamed:imageName] forState:UIControlStateNormal];
    [btn sizeToFit];
    [btn addTarget:target action:action forControlEvents:UIControlEventTouchUpInside];
    return [[UIBarButtonItem alloc]initWithCustomView:btn];
}


@end
